package rabbitmq.utils;

import com.rabbitmq.client.ConnectionFactory;
import rabbitmq.constants.Constants;

public class WorkUtils {
    public static ConnectionFactory createConnectionFactory(){
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost(Constants.HOST);
        factory.setPort(Constants.PORT);
        factory.setUsername(Constants.USERNAME);
        factory.setPassword(Constants.PASSWORD);
        factory.setVirtualHost(Constants.VIRTUAL_HOST);
        return factory;
    }
}
